unit uWindowGroupSizePosition;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ComCtrls, ToolWin, Grids, DBGridEh, StdCtrls;

type
  TfWindowGroupSizePosition = class(TForm)
    GroupBox1: TGroupBox;
    DBGridEh1: TDBGridEh;
    GroupBox2: TGroupBox;
    DBGridEh2: TDBGridEh;
    tbWindowGroupSizePosition: TToolBar;
    tbAddWindowGroupSizePosition: TToolButton;
    tbDelWindowGroupSizePosition: TToolButton;
    procedure tbAddWindowGroupSizePositionClick(Sender: TObject);
    procedure tbDelWindowGroupSizePositionClick(Sender: TObject);
    procedure DBGridEh2KeyPress(Sender: TObject; var Key: Char);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  fWindowGroupSizePosition: TfWindowGroupSizePosition;

implementation

uses uDBData;

{$R *.dfm}

procedure TfWindowGroupSizePosition.tbAddWindowGroupSizePositionClick(
  Sender: TObject);
begin
  fDBData.InsertRecord(fDBData.dWindowGroupSizePosition);
end;

procedure TfWindowGroupSizePosition.tbDelWindowGroupSizePositionClick(
  Sender: TObject);
begin
  fDBData.DeleteRecord(fDBData.dWindowGroupSizePosition);
end;

procedure TfWindowGroupSizePosition.DBGridEh2KeyPress(Sender: TObject;
  var Key: Char);
begin
  if Key = #13 then (Sender as TDBGridEh).DataSource.DataSet.Post;
end;

end.
